package com.cloud.demo.controller;

import com.cloud.api.clients.UserClient;
import com.cloud.common.entity.po.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/demo")
public class DemoController {

        @Autowired
        private UserClient userClient;

        @GetMapping("/openfeign/test")
        Result<String> openFeignTest() {
            return Result.success(userClient.test());
        }



        @GetMapping("/openfeign/testCloud")
        Result openFeignTestCloud() {
                 String  username="张三";
                Result result = userClient.testCloud(username);
                Result<Result> success = Result.success(result);System.out.println(success);
                return success;
        }



}
